package com.sevenmall.productservice.pojo;

import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import com.baomidou.mybatisplus.annotation.TableId;
import java.time.LocalDateTime;
import java.io.Serializable;

/**
 * <p>
 * 评论表
 * </p>
 *
 * @author Yesi
 * @since 2020-08-24
 */
@TableName("sevenmall_comment")
public class Comment extends Model<Comment> {

    private static final long serialVersionUID = 1L;

    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * 商品表的商品id
     */
    private Integer product_id;

    /**
     * 用户表的用户id
     */
    private Integer user_id;

    /**
     * 用户表的用户名称
     */
    private String user_name;

    /**
     * 用户表的用户头像
     */
    private String user_icon;

    /**
     * 评分,1-5
     */
    private Integer star;

    /**
     * 用户评论内容
     */
    private String content;

    /**
     * 用户评论图片,采用JSON数组格式
     */
    private String pic_urls;

    /**
     * 管理员回复内容
     */
    private String admin_content;

    /**
     * 创建时间
     */
    private LocalDateTime add_time;

    /**
     * 更新时间
     */
    private LocalDateTime update_time;

    /**
     * 逻辑删除
     */
    private Boolean deleted;

    public Integer getId() {
        return id;
    }

    public void setId(Integer id) {
        this.id = id;
    }
    public Integer getProduct_id() {
        return product_id;
    }

    public void setProduct_id(Integer product_id) {
        this.product_id = product_id;
    }
    public Integer getUser_id() {
        return user_id;
    }

    public void setUser_id(Integer user_id) {
        this.user_id = user_id;
    }
    public String getUser_name() {
        return user_name;
    }

    public void setUser_name(String user_name) {
        this.user_name = user_name;
    }
    public String getUser_icon() {
        return user_icon;
    }

    public void setUser_icon(String user_icon) {
        this.user_icon = user_icon;
    }
    public Integer getStar() {
        return star;
    }

    public void setStar(Integer star) {
        this.star = star;
    }
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }
    public String getPic_urls() {
        return pic_urls;
    }

    public void setPic_urls(String pic_urls) {
        this.pic_urls = pic_urls;
    }
    public String getAdmin_content() {
        return admin_content;
    }

    public void setAdmin_content(String admin_content) {
        this.admin_content = admin_content;
    }
    public LocalDateTime getAdd_time() {
        return add_time;
    }

    public void setAdd_time(LocalDateTime add_time) {
        this.add_time = add_time;
    }
    public LocalDateTime getUpdate_time() {
        return update_time;
    }

    public void setUpdate_time(LocalDateTime update_time) {
        this.update_time = update_time;
    }
    public Boolean getDeleted() {
        return deleted;
    }

    public void setDeleted(Boolean deleted) {
        this.deleted = deleted;
    }

    @Override
    protected Serializable pkVal() {
        return this.id;
    }

    @Override
    public String toString() {
        return "Comment{" +
            "id=" + id +
            ", product_id=" + product_id +
            ", user_id=" + user_id +
            ", user_name=" + user_name +
            ", user_icon=" + user_icon +
            ", star=" + star +
            ", content=" + content +
            ", pic_urls=" + pic_urls +
            ", admin_content=" + admin_content +
            ", add_time=" + add_time +
            ", update_time=" + update_time +
            ", deleted=" + deleted +
        "}";
    }
}
